libs = user32.lib gdi32.lib kernel32.lib comctl32.lib Advapi32.lib

!message nmake usage:
!message 'nmake'           : build debug version.
!message 'nmake release='  : build release version.
!message 'nmake clean'     : clean workshop
!message

lkf = /nologo /debug /INCREMENTAL:no /libpath:%MYLIB%
lbf = /nologo
mtf = -nologo

!ifdef release
clfcc = /nologo /c /O2 /MD /Zi /DNDEBUG /I%MYINCLUDE% /EHsc
clfc = /nologo /c /O2 /MD /Zi /DNDEBUG /I%MYINCLUDE%
!else
clfcc = /nologo /c /MDd /Zi /I%MYINCLUDE% /EHsc
clfc = /nologo /c /MDd /Zi /I%MYINCLUDE%
!endif

app = t

$(app).exe : $(app).obj tmsg.RES
	link $(lkf) /out:$@ $** $(libs) ws2_32.lib

tmsg.res : tmsg.rc
	rc $**

tmsg.h tmsg.rc : tmsg.mc
	mc -c tmsg.mc

$(app).obj : $(app).c tmsg.h
	cl $(clfc) $(app).c

clean:
	del *.exe *.rc *.obj *.pdb *.h *.dll *.res *.exp *.lib *.bin
